# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V4.Model.ObaIcon do
  @moduledoc """
  Online Behavioral Advertiser icon.

  ## Attributes

  *   `iconClickThroughUrl` (*type:* `String.t`, *default:* `nil`) - URL to redirect to when an OBA icon is clicked.
  *   `iconClickTrackingUrl` (*type:* `String.t`, *default:* `nil`) - URL to track click when an OBA icon is clicked.
  *   `iconViewTrackingUrl` (*type:* `String.t`, *default:* `nil`) - URL to track view when an OBA icon is clicked.
  *   `program` (*type:* `String.t`, *default:* `nil`) - Identifies the industry initiative that the icon supports. For example, AdChoices.
  *   `resourceUrl` (*type:* `String.t`, *default:* `nil`) - OBA icon resource URL. Campaign Manager only supports image and JavaScript icons. Learn more
  *   `size` (*type:* `GoogleApi.DFAReporting.V4.Model.Size.t`, *default:* `nil`) - OBA icon size.
  *   `xPosition` (*type:* `String.t`, *default:* `nil`) - OBA icon x coordinate position. Accepted values are left or right.
  *   `yPosition` (*type:* `String.t`, *default:* `nil`) - OBA icon y coordinate position. Accepted values are top or bottom.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :iconClickThroughUrl => String.t() | nil,
          :iconClickTrackingUrl => String.t() | nil,
          :iconViewTrackingUrl => String.t() | nil,
          :program => String.t() | nil,
          :resourceUrl => String.t() | nil,
          :size => GoogleApi.DFAReporting.V4.Model.Size.t() | nil,
          :xPosition => String.t() | nil,
          :yPosition => String.t() | nil
        }

  field(:iconClickThroughUrl)
  field(:iconClickTrackingUrl)
  field(:iconViewTrackingUrl)
  field(:program)
  field(:resourceUrl)
  field(:size, as: GoogleApi.DFAReporting.V4.Model.Size)
  field(:xPosition)
  field(:yPosition)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V4.Model.ObaIcon do
  def decode(value, options) do
    GoogleApi.DFAReporting.V4.Model.ObaIcon.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V4.Model.ObaIcon do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
